<!DOCTYPE HTML>
<html>
    
    <head>
        <title>
            管理首页
        </title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="keywords" content="" />
        <script type="application/x-javascript">
            addEventListener("load",
            function() {
                setTimeout(hideURLbar, 0);
            },
            false);
            function hideURLbar() {
                window.scrollTo(0, 1);
            }
        </script>
        <!-- Bootstrap Core CSS -->
        <link href="css/bootstrap.min.css?id=213211sss" rel='stylesheet' type='text/css' />
        <!-- Custom CSS -->
        <link href="css/style.css?id=21321" rel='stylesheet' type='text/css' />
        <link rel="stylesheet" href="css/morris.css" type="text/css" />
        <!-- Graph CSS -->
        <link href="css/font-awesome.css" rel="stylesheet">
        <!-- jQuery -->
        <script src="js/jquery-2.1.4.min.js">
        </script>
        <!-- //jQuery -->
        <link href='http://fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400'
        rel='stylesheet' type='text/css' />
        <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700'
        rel='stylesheet' type='text/css'>
        <!-- lined-icons -->
        <link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
        <!-- //lined-icons -->
    </head>
    <style>

        .info li {

              list-style: none;
    line-height: 33px;
    font-size: 13px;
    border-bottom: dashed 1px #ccc;
        }


   </style>
    <body>
        <div class="page-container">
        	<div class="left-content">
                <div class="mother-grid-inner">
                   
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                            <a href="home.php">
                                概述
                            </a>
                            <i class="fa fa-angle-right">
                            </i>
                        </li>
                    </ol>
                    <!--four-grids here-->
                    <div class="four-grids">
                        <div class="col-md-3 four-grid">
                            <div class="four-agileits">
                                <div class="icon">
                                    <i class="glyphicon glyphicon-user" aria-hidden="true">
                                    </i>
                                </div>
                                <div class="four-text">
                                    <h3>
                                        支付订单统计
                                    </h3>
                                    <h4>
                                       
                                       <?=$sum?>条【 <?=$summ?>元】
                                    </h4>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3 four-grid">
                            <div class="four-agileinfo">
                                <div class="icon">
                                    <i class="glyphicon glyphicon-list-alt" aria-hidden="true">
                                    </i>
                                </div>
                                <div class="four-text">
                                    <h3>
                                        账户余额
                                    </h3>
                                    <h4>
                                        <?=$agent_info['money']?> 元 &nbsp;&nbsp;
                                        <button  onclick="location.href='tixian.php'" type="submit" class="btn btn-default" style="background: #000; line-height: 17px; height: 30px; color:#fff">提现</button>
                                    </h4>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3 four-grid" <?php if(!isMobile() ){ ?> style="width:50%; "  <?php } ?>>

                            <div  style="background:#fff; padding: 2px;">
                               <ul class ="info" style="margin-left: -28px;">
                                   <li>商户账号：<span style="color:#1b93e1"><?=$_SESSION['agent_name']?></span></li>
                                   <li>商户秘钥：<span style="color:#1b93e1"><?=$agent_info['key']?></span></li>
                                   <li>商户网站：<span style="color:#1b93e1">
                                    <?=$agent_info['url']?></span>
                                   </li>
                                   <li>商户状态：
                                     <?php  if($agent_info['zt'] == 0) {?>
                                       <span style="color:red">停用</span>
                                     <?php  }else{  ?>
                                        
                                        <span style="color:#1b93e1">正常</span>

                                     <?php  } ?>  
                                   </li>
                                   <li>支付费率：
                                    微信<span style="color:#1b93e1"><?=$agent_info['wx']?>%</span>&nbsp;
                                    支付宝<span style="color:#1b93e1"><?=$agent_info['zfb']?>%</span>&nbsp;
                                    商家码<span style="color:#1b93e1"><?=$agent_info['sjm']?>%</span>
                                   </li>
                            <li>昨日收款：<span style="color:#1b93e1"><?=$yess?></span>，今日收款：<span style="color:#1b93e1"><?=$todays?></span></li>
                               </ul>

                            </div>
                        </div>
                        
                        <div class="clearfix">
                        </div>
                    </div>
                    <script>
					$(document).ready(function(){

					 $("#save").click(function(){

					       var data = $("#infos").serialize();
					                      $.ajax({
					                            'type': 'POST',
					                            'url': "home",
					                            'data': data,
					                            'dataType': 'json',
					                            success: function(res) {
					                                if (res.e == 0) {
					                                    $("#lj").show();
					                                    $("#msg").text(res.msg);
					                                } else {
					                                   alert(res.msg);
					                                }
					                            }
					                          })
					 });


					})        
					</script>

                    <!--//four-grids here-->
                    <!--agileinfo-grap-->
                
                    <!--//agileinfo-grap-->
                    <!--photoday-section-->
                    <div class="col-sm-4 wthree-crd" >
                        <div class="card card-contact-list" style="overflow: scroll; height: 400px;">
                            <div class="agileinfo-cdr">
                                <div class="card-header">
                                    <h3>
                                        &nbsp;&nbsp;访问统计
                                    </h3>
                                </div>
                                  <div class="widget-body p-15">
                                        <table class="table table-bordered"  style="    table-layout: fixed;word-break: break-all;">
                                            <thead>
                                                <tr>
                                                    <th>
                                                        ID
                                                    </th>
                                                    <th>
                                                        IP
                                                    </th>
                                                    <th>
                                                        时间
                                                    </th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                  <?php foreach($list as $v){ ?>
                                                    <tr>
                                                        <td>
                                                            <?=$v['id']?>
                                                        </td>
                                                        <td>
                                                           <?=$v['ip']?>
                                                        </td>
                                                        <td>
                                                             <?=date('Y-m-d H:i:s',$v['addtime'])?>
                                                        </td>
                                                       
                                                    </tr>
                                                    <?php } ?>  
                                           
                                               
                                              
                                              
                                            </tbody>
                                        </table>
                                    </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-4 w3-agileits-crd"  <?php if(!isMobile() ){ ?> style="width:75%"  <?php } ?> >
                        <div class="card card-contact-list" style="overflow: scroll; height: 400px;">
                            <div class="agileinfo-cdr">
                                <div class="card-header">
                                    <h3>
                                        &nbsp;&nbsp;支付订单
                                    </h3>
                                </div>
                                  <div class="widget-body p-15">
                                        <table class="table table-bordered">
                                            <thead>
                                                <tr>
                                                    <th>
                                                        序号
                                                    </th>
                                                    <th>
                                                        订单号
                                                    </th>
                                                    <th>
                                                        充值方式
                                                    </th>
                                                    <th>
                                                        到账时间
                                                    </th>
                                                    <th>
                                                        充值金额
                                                    </th>
                                                    <th>
                                                        充值状态
                                                    </th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                               <?php  foreach($lists as $v){?>
                                        <tr>
                                            <td>
                                               <?=$v['id']?>
                                            </td>
                                            <td>
                                               <?=$v['ordernum']?>
                                            </td>
                                            <td>
                                               <?php if($v['class'] == 1) {?>
                                                     微信
                                               <?php }elseif($v['class'] == 2){ ?>
                                                     支付宝

                                               <?php }elseif($v['class'] == 3){ ?>
                                                    商家码
                                               <?php } ?>
                                            </td>
                                            
                                           
                                            <td>
                                                <?=date('Y-m-d H:i:s',$v['pipeitime'])?>
                                            </td>
                                             <td>
                                                <?=$v['price']?>实到
												 
												<?php if($v['class'] == 1) {?>
                                                    <?=$v['price']-($v['price']*$agent_info['wx']/100)?>
                                               <?php }elseif($v['class'] == 2){ ?>
                                                    <?=$v['price']-($v['price']*$agent_info['zfb']/100)?>

                                               <?php }elseif($v['class'] == 3){ ?>
                                                   <?=$v['price']-($v['price']*$agent_info['sjm']/100)?>
                                               <?php } ?>
                                               
                                            </td>
                                             <td>
                                               已到账
                                            </td>
                                           
                                        </tr>
                                        <?php }?>
                                            </tbody>
                                        </table>
                                    </div>
                            </div>
                        </div>
                    </div>
                   
                 
                    <!--//photoday-section-->
                    <!--w3-agileits-pane-->
                  
                    <!--//w3-agileits-pane-->
                    <!-- script-for sticky-nav -->
                    <script>
                        $(document).ready(function() {
                            var navoffeset = $(".header-main").offset().top;
                            $(window).scroll(function() {
                                var scrollpos = $(window).scrollTop();
                                if (scrollpos >= navoffeset) {
                                    $(".header-main").addClass("fixed");
                                } else {
                                    $(".header-main").removeClass("fixed");
                                }
                            });

                        });
                    </script>
                    <!-- /script-for sticky-nav -->
                    <!--inner block start here-->
                    <div class="inner-block">
                    </div>
                    <!--inner block end here-->
                    <!--copy rights start here-->
                   
                    <!--COPY rights end here-->
                </div>
            </div>
            <!--/content-inner-->
            <?php  include('./tpl/nav.php');?>
            <!--//content-inner-->
            <!--/sidebar-menu-->
            
        </div>
        <script>
            var toggle = true;

            $(".sidebar-icon").click(function() {
                if (toggle) {
                    $(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
                    $("#menu span").css({
                        "position": "absolute"
                    });
                } else {
                    $(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
                    setTimeout(function() {
                        $("#menu span").css({
                            "position": "relative"
                        });
                    },
                    400);
                }

                toggle = !toggle;
            });
        </script>
        <!--js -->
        <script src="js/jquery.nicescroll.js">
        </script>
        <script src="js/scripts.js">
        </script>
        <!-- Bootstrap Core JavaScript -->
        <script src="js/bootstrap.min.js">
        </script>
        <!-- /Bootstrap Core JavaScript -->
        <!-- morris JavaScript -->
        <script src="js/raphael-min.js">
        </script>
        <script src="js/morris.js">
        </script>
        <script>
            $(document).ready(function() {
                //BOX BUTTON SHOW AND CLOSE
                jQuery('.small-graph-box').hover(function() {
                    jQuery(this).find('.box-button').fadeIn('fast');
                },
                function() {
                    jQuery(this).find('.box-button').fadeOut('fast');
                });
                jQuery('.small-graph-box .box-close').click(function() {
                    jQuery(this).closest('.small-graph-box').fadeOut(200);
                    return false;
                });

                //CHARTS
                function gd(year, day, month) {
                    return new Date(year, month - 1, day).getTime();
                }

                graphArea2 = Morris.Area({
                    element: 'hero-area',
                    padding: 10,
                    behaveLikeLine: true,
                    gridEnabled: false,
                    gridLineColor: '#dddddd',
                    axes: true,
                    resize: true,
                    smooth: true,
                    pointSize: 0,
                    lineWidth: 0,
                    fillOpacity: 0.85,
                    data: [{
                        period: '2014 Q1',
                        iphone: 2668,
                        ipad: null,
                        itouch: 2649
                    },
                    {
                        period: '2014 Q2',
                        iphone: 15780,
                        ipad: 13799,
                        itouch: 12051
                    },
                    {
                        period: '2014 Q3',
                        iphone: 12920,
                        ipad: 10975,
                        itouch: 9910
                    },
                    {
                        period: '2014 Q4',
                        iphone: 8770,
                        ipad: 6600,
                        itouch: 6695
                    },
                    {
                        period: '2015 Q1',
                        iphone: 10820,
                        ipad: 10924,
                        itouch: 12300
                    },
                    {
                        period: '2015 Q2',
                        iphone: 9680,
                        ipad: 9010,
                        itouch: 7891
                    },
                    {
                        period: '2015 Q3',
                        iphone: 4830,
                        ipad: 3805,
                        itouch: 1598
                    },
                    {
                        period: '2015 Q4',
                        iphone: 15083,
                        ipad: 8977,
                        itouch: 5185
                    },
                    {
                        period: '2016 Q1',
                        iphone: 10697,
                        ipad: 4470,
                        itouch: 2038
                    },
                    {
                        period: '2016 Q2',
                        iphone: 8442,
                        ipad: 5723,
                        itouch: 1801
                    }],
                    lineColors: ['#ff4a43', '#a2d200', '#22beef'],
                    xkey: 'period',
                    redraw: true,
                    ykeys: ['iphone', 'ipad', 'itouch'],
                    labels: ['All Visitors', 'Returning Visitors', 'Unique Visitors'],
                    pointSize: 2,
                    hideHover: 'auto',
                    resize: true
                });

            });
        </script>
    </body>

</html>